/*
This is an example script for a label (a single line of text). Click the Execute button to apply and then execute this script. Upon each execution the label alters its appearance. Turn on animation to execute periodically.
*/

/* Declaration blocks */

@@class() Widestring:Object

@@method(public, class) (id)alloc;
@@method(public, instance) (id)init;
@@method(public, instance) (id)value;
@@method(public, instance) (void) appendIntValue:(int)anInt;
@@method(public, instance) (void) appendCString:(const char *)aCString;

@@end

@@class() Label:Object

@@method(public, class) (id)stored;
@@method(public, instance) (unsigned)animationCount;
@@method(public, instance) (void)updateToUFT8String:(const char *)aString;

@@end

/* Execution block */

{
id myString;
id myLabel;
unsigned animationCount;
int anInt;

myLabel = [Label stored];

animationCount = [myLabel animationCount];

if(animationCount % 20 < 10)
{
myString = [[Widestring alloc] init];

[myString appendCString:"Animation Step: "];

anInt = animationCount;
[myString appendIntValue:anInt];

[myLabel updateToWidestringValue:[myString value]];

[myString release];
}
else
{
[myLabel updateToUFT8String:"A Simple String Assignment"];
}

}
